package com.polito.mad.bikeponyapp.persistence;

import java.util.List;

import android.database.Cursor;
import android.database.SQLException;

public interface DAO<T> {

	public List<T> getAll();
	public T getCursor(Cursor c);
	public T get(long id);
	public T add(T entity) throws SQLException;
	public List<T> addAll(List<T> entities) throws SQLException;
	public void delete(T entity) throws SQLException;
	public int deleteAll(List<T> entities)throws SQLException;
	public T update(T item)throws SQLException;
	public List<T> updateAll(List<T> items)throws SQLException;
	public int count();
	public List<T> findByQuery(String query);
	public Cursor getAllAsCursor();
	public String getColumnNameByIndex(int colIndex);
	public void close();
}
